/**
 * Created by Administrator on 2022/8/17.
 */
public class Student {
    public String name;
    public String gender;
    public int age;
    private static String classRoom;

    //构造代码块、实例代码块
    {
        this.name = "小薇";
        this.gender = "女";
        this.age = 18;
    }

    // 静态代码块
    static {
        classRoom = "2131";
        System.out.println("I am static init()!");
    }

    public static void main(String[] args) {
        Student s1 = new Student();
        System.out.println(s1.name);
        System.out.println(Student.classRoom);
    }
}